<!--
    ***** BEGIN LICENSE BLOCK *****
    
    Copyright © 2006–2022 Center for History and New Media
                     George Mason University, Fairfax, Virginia, USA
                     http://zotero.org
    
    This file is part of Zotero.
    
    Zotero is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.
    
    Zotero is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.
    
    You should have received a copy of the GNU Affero General Public License
    along with Zotero.  If not, see <http://www.gnu.org/licenses/>.
    
    ***** END LICENSE BLOCK *****
-->
<vbox id="zotero-prefpane-general"
	onload="Zotero_Preferences.General.init()"
	onunload="Zotero_Preferences.General.uninit()"
>
	<vbox class="main-section">
		<groupbox aria-labelledby="preferences-appearance-title">
			<label><html:h2 id="preferences-appearance-title" data-l10n-id="preferences-appearance-title"/></label>
		
			<groupbox aria-labelledby="color-scheme-label">
				<hbox align="center">
					<label id="color-scheme-label" data-l10n-id="preferences-color-scheme"/>
					<radiogroup orient="horizontal" id="color-scheme" preference="browser.theme.toolbar-theme">
						<radio data-l10n-id="preferences-color-scheme-auto" value="2"/>
						<radio data-l10n-id="preferences-color-scheme-light" value="1"/>
						<radio data-l10n-id="preferences-color-scheme-dark" value="0"/>
					</radiogroup>
				</hbox>
			</groupbox>
		
			<hbox align="center">
				<label value="&zotero.bibliography.locale.label;" control="locale-menu"/>
				<menulist id="locale-menu"
						onblur="if (!Zotero.isMac) Zotero_Preferences.General.onLocaleChange()"
						native="true">
					<menupopup onpopuphidden="Zotero_Preferences.General.onLocaleChange()"/>
				</menulist>
			</hbox>

			<hbox align="center">
				<label data-l10n-id="preferences-item-pane-header" control="item-pane-header-menulist"/>
				<menulist id="item-pane-header-menulist" preference="extensions.zotero.itemPaneHeader" native="true">
					<menupopup>
						<menuitem data-l10n-id="item-pane-header-none" value="none"/>
						<menuitem data-l10n-id="item-pane-header-title" value="title"/>
						<menuitem data-l10n-id="item-pane-header-titleCreatorYear" value="titleCreatorYear"/>
						<menuitem data-l10n-id="item-pane-header-bibEntry" value="bibEntry"/>
					</menupopup>
				</menulist>
			</hbox>

			<vbox id="item-pane-header-bib-entry-options" class="indented-pref">
				<hbox align="center">
					<label data-l10n-id="preferences-item-pane-header-style" control="item-pane-header-style-menu"/>
					<menulist
							id="item-pane-header-style-menu"
							preference="extensions.zotero.itemPaneHeader.bibEntry.style"
							native="true"
							flex="1"
					><menupopup/></menulist>
				</hbox>

				<hbox align="center">
					<label data-l10n-id="preferences-item-pane-header-locale" control="item-pane-header-locale-menu"/>
					<menulist
							id="item-pane-header-locale-menu"
							preference="extensions.zotero.itemPaneHeader.bibEntry.locale"
							native="true"
					><menupopup/></menulist>
				</hbox>
			</vbox>
		</groupbox>
		
		<groupbox id="zotero-prefpane-file-handling-groupbox" aria-label="&zotero.preferences.fileHandling;">
			<label><html:h2>&zotero.preferences.fileHandling;</html:h2></label>
			
			<vbox>
				<checkbox label="&zotero.preferences.downloadAssociatedFiles;"
					preference="extensions.zotero.downloadAssociatedFiles"
					native="true"
				/>
				<checkbox data-l10n-id="preferences-auto-recognize-files"
					preference="extensions.zotero.autoRecognizeFiles"
					native="true"
				/>
				<checkbox id="automaticSnapshots-checkbox"
					label="&zotero.preferences.automaticSnapshots;"
					preference="extensions.zotero.automaticSnapshots"
					native="true"
				/>
			</vbox>
		
		</groupbox>
		
		<groupbox id="zotero-prefpane-file-renaming-groupbox" aria-labelledby="preferences-file-renaming-title" aria-describedby="preferences-file-renaming-intro">
			<label><html:h2 id="preferences-file-renaming-title" data-l10n-id="preferences-file-renaming-title"/></label>
			
			<vbox align="start">
				<label id="preferences-file-renaming-intro" data-l10n-id="preferences-file-renaming-intro"/>
				<separator class="thin"/>
				<checkbox id="auto-rename-files"
					data-l10n-id="preferences-file-renaming-auto-rename-files"
					preference="extensions.zotero.autoRenameFiles"
					oncommand="setTimeout(() => { Zotero_Preferences.General.handleAutoRenameChange(); Zotero_Preferences.General.updateAutoRenameFilesUI(); })" native="true"
				/>
				<vbox class="indented-pref" aria-labelledby="preferences-file-renaming-file-types" role="group">
					<label id="preferences-file-renaming-file-types" data-l10n-id="preferences-file-renaming-file-types"/>
					<hbox
						id="zotero-prefpane-file-renaming-file-types-box"
						class="indented-pref"
						oncommand="Zotero_Preferences.General.setAutoRenameFileTypes()"
					>
						<checkbox
							data-l10n-id="preferences-file-renaming-file-type-pdf"
							data-content-type="application/pdf"
							native="true"
						/>
						<checkbox
							data-l10n-id="preferences-file-renaming-file-type-epub"
							data-content-type="application/epub+zip"
							native="true"
						/>
						<checkbox
							data-l10n-id="preferences-file-renaming-file-type-image"
							data-content-type="image/"
							native="true"
						/>
						<checkbox
							data-l10n-id="preferences-file-renaming-file-type-audio"
							data-content-type="audio/"
							native="true"
						/>
						<checkbox
							data-l10n-id="preferences-file-renaming-file-type-video"
							data-content-type="video/"
							native="true"
						/>
					</hbox>
				</vbox>
				<checkbox id="rename-linked-files" class="indented-pref"
					label="&zotero.preferences.autoRenameFiles.renameLinked;"
					preference="extensions.zotero.autoRenameFiles.linked"
					oncommand="Zotero_Preferences.General.updateAutoRenameFilesUI()" native="true"
				/>
				<hbox id="file-renaming-buttons">
					<button id="file-renaming-customize-button"
						data-l10n-id="preferences-file-renaming-customize-button"
						data-search-strings="preferences-file-renaming-format-title, preferences-file-renaming-format-template"
						oncommand="Zotero_Preferences.navigateToPane('zotero-subpane-file-renaming')"
					/>
					<button
						hidden="true"
						id="file-renaming-general-rename-now"
						data-l10n-id="preferences-file-renaming-rename-now"
						oncommand="Zotero_Preferences.General.openRenameFilesPreview()"
					/>
				</hbox>
			</vbox>
		</groupbox>
		
		<groupbox id="zotero-prefpane-reader-groupbox" aria-labelledby="preferences-reader-title">
			<label><html:h2 id="preferences-reader-title" data-l10n-id="preferences-reader-title"/></label>
			
			<vbox class="fileHandler-menus">
				<label control="fileHandler-pdf">&zotero.preferences.fileHandler.openPDFsUsing;</label>
				<menulist id="fileHandler-pdf" class="fileHandler-menu" native="true">
					<menupopup>
						<menuitem class="fileHandler-internal"
								oncommand="Zotero_Preferences.General.setFileHandler('pdf', '')"/>
						<menuitem label="&zotero.preferences.fileHandler.systemDefault;"
								oncommand="Zotero_Preferences.General.setFileHandler('pdf', 'system')"/>
						<menuitem class="fileHandler-custom"/>
						<menuitem label="&zotero.preferences.custom;"
								oncommand="Zotero_Preferences.General.chooseFileHandler('pdf')"/>
					</menupopup>
				</menulist>
				<label data-l10n-id="preferences-reader-open-epubs-using" control="fileHandler-epub"/>
				<menulist id="fileHandler-epub" class="fileHandler-menu" native="true">
					<menupopup>
						<menuitem class="fileHandler-internal"
								oncommand="Zotero_Preferences.General.setFileHandler('epub', '')"/>
						<menuitem label="&zotero.preferences.fileHandler.systemDefault;"
								oncommand="Zotero_Preferences.General.setFileHandler('epub', 'system')"/>
						<menuitem class="fileHandler-custom"/>
						<menuitem label="&zotero.preferences.custom;"
								oncommand="Zotero_Preferences.General.chooseFileHandler('epub')"/>
					</menupopup>
				</menulist>
				<label data-l10n-id="preferences-reader-open-snapshots-using" control="fileHandler-snapshot"/>
				<menulist id="fileHandler-snapshot" class="fileHandler-menu" native="true">
					<menupopup>
						<menuitem class="fileHandler-internal"
								oncommand="Zotero_Preferences.General.setFileHandler('snapshot', '')"/>
						<menuitem label="&zotero.preferences.fileHandler.systemDefault;"
								oncommand="Zotero_Preferences.General.setFileHandler('snapshot', 'system')"/>
						<menuitem class="fileHandler-custom"/>
						<menuitem label="&zotero.preferences.custom;"
								oncommand="Zotero_Preferences.General.chooseFileHandler('snapshot')"/>
					</menupopup>
				</menulist>
			</vbox>
			<checkbox id="open-reader-in-new-window"
				data-l10n-id="preferences-reader-open-in-new-window"
				class="indented-pref"
				preference="extensions.zotero.openReaderInNewWindow"
				native="true"
			/>
			
			<hbox align="center">
				<label value="&zotero.preferences.reader.tabsTitle.label;" control="reader-tabs-title"/>
				<menulist id="reader-tabs-title" preference="extensions.zotero.tabs.title.reader" native="true">
					<menupopup>
						<menuitem label="&zotero.preferences.reader.tabsTitle.titleCreatorYear;" value="titleCreatorYear"/>
						<menuitem label="&zotero.preferences.reader.tabsTitle.creatorYearTitle;" value="creatorYearTitle"/>
						<menuitem label="&zotero.preferences.reader.tabsTitle.filename;" value="filename"/>
					</menupopup>
				</menulist>
			</hbox>
			
			<vbox>
				<checkbox
					id="auto-disable-tool"
					data-l10n-id="preferences-reader-auto-disable-tool"
					native="true"
				/>
			</vbox>
			
			<hbox align="center">
				<label data-l10n-id="preferences-reader-ebook-font" control="reader-ebook-font-family"/>
				<menulist id="reader-ebook-font-family" preference="extensions.zotero.reader.ebookFontFamily" native="true">
					<menupopup/>
				</menulist>
			</hbox>

			<checkbox
				class="indented-pref"
				preference="extensions.zotero.reader.ebookHyphenate"
				data-l10n-id="preferences-reader-ebook-hyphenate"
				native="true"
			/>
		</groupbox>
		
		<groupbox id="zotero-prefpane-locate-groupbox" aria-label="&zotero.preferences.prefpane.locate;" aria-describedby="preferences-locate-library-lookup-intro">
			<label><html:h2>&zotero.preferences.prefpane.locate;</html:h2></label>
			
			<label id="preferences-locate-library-lookup-intro" data-l10n-id="preferences-locate-library-lookup-intro"/>
			<separator class="thin"/>
			
			<hbox align="center">
				<label control="openurl-menu" data-l10n-id="preferences-locate-resolver"></label>
				<menulist id="openurl-menu" native="true">
					<menupopup
							id="openurl-primary-popup"
							onpopupshowing="Zotero_Preferences.General.handleOpenURLPopupShowing(event)"
							onpopuphidden="Zotero_Preferences.General.handleOpenURLPopupHidden(event)"
							oncommand="Zotero_Preferences.General.handleOpenURLSelected(event)">
						<menuitem/>
					</menupopup>
				</menulist>
			</hbox>
			
			<hbox style="display: flex; align-items: center;">
				<label control="openURLServerField" data-l10n-id="preferences-locate-base-url"/>
				<html:input type="text" id="openURLServerField" style="flex: 1;"
					oninput="Zotero_Preferences.General.onOpenURLCustomized();"
					preference="extensions.zotero.openURL.resolver"
					dir="ltr"
				/>
			</hbox>
			
		</groupbox>
		
		<groupbox id="zotero-prefpane-miscellaneous-groupbox" aria-label="&zotero.preferences.miscellaneous;">
			<label><html:h2>&zotero.preferences.miscellaneous;</html:h2></label>
			
			<checkbox label="&zotero.preferences.automaticTags;" preference="extensions.zotero.automaticTags" native="true"/>
			<hbox align="center">
				<label id="trashAutoEmpty-label1" value="&zotero.preferences.trashAutoEmptyDaysPre;"/>
				<html:input aria-labelledby="trashAutoEmpty-label1 trashAutoEmpty-label2" type="text" size="2" preference="extensions.zotero.trashAutoEmptyDays"/>
				<label id="trashAutoEmpty-label2" value="&zotero.preferences.trashAutoEmptyDaysPost;"/>
			</hbox>
		</groupbox>

		<groupbox aria-label="&zotero.preferences.groups;" aria-description="&zotero.preferences.groups.whenCopyingInclude;">
			<label><html:h2>&zotero.preferences.groups;</html:h2></label>

			<label value="&zotero.preferences.groups.whenCopyingInclude;"/>
			<vbox style="margin-left: 2em">
				<checkbox label="&zotero.preferences.groups.childNotes;" preference="extensions.zotero.groups.copyChildNotes" native="true"/>
				<checkbox label="&zotero.preferences.groups.childFiles;" preference="extensions.zotero.groups.copyChildFileAttachments" native="true"/>
				<checkbox label="&zotero.preferences.groups.annotations;" preference="extensions.zotero.groups.copyAnnotations" native="true"/>
				<checkbox label="&zotero.preferences.groups.childLinks;" preference="extensions.zotero.groups.copyChildLinks" native="true"/>
				<checkbox label="&zotero.preferences.groups.tags;" preference="extensions.zotero.groups.copyTags" native="true"/>
			</vbox>
		</groupbox>
	</vbox>
</vbox>
